package com.briup.xml.mapper;

import com.briup.xml.domain.hurdles;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import java.time.LocalDate;
import java.util.Collection;

public interface hurdlesMapper {

    public void deleteById(String h_id);
    
    // 批量删除栏圈信息
    public void batchDeleteByIds(@Param("ids") Collection<String> ids);
    
    //插入hurdles
    public void insert(hurdles h);
    //插入并返回主键id值
    public void insert_id(hurdles h);
    public void insert_id2(hurdles h);
    //更新hurdles
    public void update(hurdles h);
    //根据id获取hurdles信息
    public hurdles getById(String h_id);
    //根据id获取hurdles信息及关联的栏舍信息（嵌套结果）
    public hurdles getByIdWithFenceNestedResult(String h_id);
    //根据id获取hurdles信息及关联的栏舍信息（嵌套查询）
    public hurdles getByIdWithFenceNestedQuery(String h_id);
    //多条件查询
    public List<hurdles> list(@Param("name") String h_name,
                           @Param("status") String h_enable,
                           @Param("begin") LocalDate begin,
                           @Param("end") LocalDate end);
    // 根据栏圈名称、栏圈存储猪容量、栏圈已存猪数量、是否禁用、是否已满查询
    public List<hurdles> selectByConditions(hurdles condition);
    // 根据栏舍id查询栏圈信息
    public List<hurdles> listByFenceId(String fenceId);
}